﻿//
// Created: 2018/12/15
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.ZXBuiness;

namespace Model.ZXBuiness.Map
{
    internal  class ZXProductRateMap:EntityTypeConfiguration< ZXProductRate >    
    {
        public ZXProductRateMap()
        {
             this.ToTable("ZX_Product_Rate");
             this.HasKey(i => new { i.Product_ZX_Rate_Id });
             this.Property(i => i.Product_ZX_Rate_Id).HasColumnName("Product_ZX_Rate_Id");                     
             this.Property(i => i.ProductId).HasColumnName("ProductId");                     
             this.Property(i => i.P1Rate).HasColumnName("P1Rate");                     
             this.Property(i => i.P2Rate).HasColumnName("P2Rate");                     
             this.Property(i => i.P3Rate).HasColumnName("P3Rate");                     
             this.Property(i => i.P4Rate).HasColumnName("P4Rate");                     
             this.Property(i => i.P5Rate).HasColumnName("P5Rate");                     
             this.Property(i => i.P6Rate).HasColumnName("P6Rate");                     
             this.Property(i => i.P7Rate).HasColumnName("P7Rate");                     
             this.Property(i => i.P8Rate).HasColumnName("P8Rate");                     
             this.Property(i => i.P9Rate).HasColumnName("P9Rate");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");                     
             this.Property(i => i.State).HasColumnName("State");                     
        }   
    }
    
     public static class ZXProductRateMapExtensions
    {
        public static void UserZXProductRateMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new ZXProductRateMap());
        }
    }
}